#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdlib.h>
#include "parser.h"
#include "lexer.h"
#include "node.h"
int main() {
    FILE* in = nullptr;
    char buffer[256] = { 0 };

    in = fopen("in.txt","rt");
    if (!in) {
        std::cout << "ERROR." << std::endl;
        return 0;
    }
    fread(buffer, 1, 256, in);
    Lexer lexer(
        buffer
    );
    Parser parser(&lexer);
    Stmt* seq = parser.stmts();
    seq->gen();
    std::cout << std::endl;
    std::cin.get();
}